package com.cn.kabalifeuser.ui.my.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.cn.kabalifeuser.R;
import com.cn.kabalifeuser.ui.my.bean.FansListBean;
import com.cn.kabalifeuser.ui.my.bean.VipInfoBean;
import com.cn.kabalifeuser.view.CircularProgressView;

import java.util.List;

/**
 * Created by 晓林 on 2020/9/25.
 * function:
 */
public class VipRightsAndInterestsAdapter extends BaseQuickAdapter<VipInfoBean.ResultBean, BaseViewHolder> {
    public VipRightsAndInterestsAdapter(int layoutResId, @Nullable List<VipInfoBean.ResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, VipInfoBean.ResultBean item) {
        helper.setText(R.id.tv_name, item.getName())
                .setText(R.id.tv_share, item.getShare() + "%")
                .setText(R.id.tv_after_time, item.getSub_share() + "%");


        CircularProgressView pr_share = helper.getView(R.id.pr_share);

        CircularProgressView pw_after_time = helper.getView(R.id.pw_after_time);
        pr_share.setProgress(item.getShare());
        pw_after_time.setProgress(item.getAfter_time());

    }
}
